home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 2.iso / bin / stopOKServer < prev    next >
Text File  |  1996-11-11  |  991b  |  56 lines

  1. #!/bin/csh -f
  2.  
  3. #
  4. # update path to also look in the same directory from 
  5. # where this script was executed from
  6. #
  7.  
  8. set path = (/usr/bsd /bin /usr/bin /usr/sbin /usr/bin/X11)
  9. set DT_xconfirm = "$DT_utilities/DT_xconfirm"
  10.  
  11. set path = (${DT_util_path} $path)
  12.  
  13. # make sure CDROM_ROOT envariable is set 
  14.  
  15. if (! $?CDROM_ROOT) then
  16.     $DT_xconfirm notviewDT
  17.     exit 0
  18. endif
  19.  
  20. #
  21. # find out and remember the user name
  22. #
  23.  
  24. if ($?HOME) then
  25.     set userHome = $HOME
  26. else
  27.     $DT_xconfirm nohome
  28.     exit 0
  29. endif
  30.  
  31. #
  32. # get the port number on which the ok server is running 
  33. # from a stored file
  34. #
  35. if ( -e $userHome/$DT_WWW_ROOT/logs/oksrv.port ) then
  36.     set sockPort = `cat $userHome/$DT_WWW_ROOT/logs/oksrv.port`
  37. else
  38.     $DT_xconfirm error "Could not determine the port number of dt_oksvr (Search Server)\
  39.     Cannot stop it."
  40.     exit 0
  41. endif
  42.  
  43.  
  44. setenv OKSVR_PORT $sockPort
  45. #
  46. # stop ok server
  47. #
  48. okserver stop
  49.  
  50. #
  51. # clean this file on the way out
  52. #
  53. /usr/bin/rm $userHome/$DT_WWW_ROOT/logs/oksrv.port
  54.  
  55. exit 1
  56.